package com.edu.hre.struts.form.pim;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.struts.action.ActionForm;
import org.apache.struts.util.LabelValueBean;

import com.edu.hre.common.utils.CommonUtils;

public class EmpDependentUpdateForm extends ActionForm {
	
	private Integer id = 0;
	private String edName = "";
	private String relationshipType; // 1 for children and 2 for others
	private Date edDateOfBirth = null;
	private int empNumber;
	
	private String message = "";
	private boolean isAddNew = true;
	
	private List<LabelValueBean> allRelationships = new ArrayList<LabelValueBean>();
	
	public EmpDependentUpdateForm() {

	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getEdName() {
		return edName;
	}

	public void setEdName(String edName) {
		this.edName = edName;
	}

	public String getEdDateOfBirth() {
		return CommonUtils.dateToString(edDateOfBirth);
	}

	public void setEdDateOfBirth(String edDateOfBirth) {
		this.edDateOfBirth = CommonUtils.stringToDate(edDateOfBirth);
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public boolean isAddNew() {
		return isAddNew;
	}

	public void setAddNew(boolean isAddNew) {
		this.isAddNew = isAddNew;
	}
	
	public boolean getIsAddNew() {
		return isAddNew;
	}

	public void setIsAddNew(boolean isAddNew) {
		this.isAddNew = isAddNew;
	}

	public String getRelationshipType() {
		return relationshipType;
	}

	public void setRelationshipType(String relationshipType) {
		this.relationshipType = relationshipType;
	}

	public List<LabelValueBean> getAllRelationships() {
		return allRelationships;
	}

	public void setAllRelationships(List<LabelValueBean> allRelationships) {
		this.allRelationships = allRelationships;
	}

	public int getEmpNumber() {
		return empNumber;
	}

	public void setEmpNumber(int empNumber) {
		this.empNumber = empNumber;
	}
}
